<?php

class Core_Api_Inputfilter
{
	public $purifier = NULL;

	function __construct()
	{
		require_once LEGACY_DIR . 'htmlpurifier/HTMLPurifier.auto.php';
		$this -> purifier = new HTMLPurifier();
	}

	/**
	 * @param  string  $string
	 * @return string
	 */
	function cleanText($string)
	{
		return strip_tags($string);
	}
	
	/**
	 * @param  string  $html
	 * @return string
	 */
	function cleanHtml($html)
	{
		$this->purifier->purify($html);	
	}
}
